package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerGuildItemLog implements IQLResponse
{
    /// <summary>
    /// 玩家Id
    /// </summary>
    public long UserId;

    /// <summary>
    /// 玩家昵称
    /// </summary>
    public String Nickname;

    /// <summary>
    /// 动作 1存入 2领取
    /// </summary>
    public long Action;

    /// <summary>
    /// 道具名称
    /// </summary>
    public String ItemName;

    /// <summary>
    /// 道具数量
    /// </summary>
    public long ItemCount;

    /// <summary>
    /// 创建时间
    /// </summary>
    public String CreateTime;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("user_id"))
            UserId = t.getLong("user_id");
        if (t.has("nickname"))
            Nickname = t.getString("nickname");
        if (t.has("action"))
            Action = t.getLong("action");
        if (t.has("item_name"))
            ItemName = t.getString("item_name");
        if (t.has("item_count"))
            ItemCount = t.getLong("item_count");
        if (t.has("create_time"))
            CreateTime = t.getString("create_time");
    }
}
